package com.nami.store.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 会话
 * </p>
 *
 * @author lbc
 * @since 2023-08-01
 */
@Data
@TableName("conversation")
public class ConversationDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 应用
     */
    private String appKey;

    /**
     * 发送者
     */
    private String userId;

    /**
     * 接收者
     */
    private String targetId;

    /**
     * 是否免打扰
     */
    private Boolean ifMute;

    /**
     * 是否置顶
     */
    private Boolean ifTop;

    private Integer converType;

    private String latestMsgId;
    private String latestMsg;
    private Integer latestUnreadMsgIndex;
    private Integer latestReadMsgIndex;
    private String latestReadMsgId;
    private Long latestReadMsgTime;
    private Long sortTime;
    private Long syncTime;

    private Long topUpdatedTime;

    private Integer unreadTag;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    private String delFlag;

    /**
     * 创建时间
     */
    private Date createTime;


}
